1 Split-plot desgn に沿った解析

library(lme4)

splitplot_anova <- function(i) {
  d <- data[rownames(data)==n$name[i],]
  #print(n$name[i])
  ylab <- n$label[i]
  d<-data.frame(value=as.vector(t(d)[,1]),solar=substring(colnames(d),1,3),fert=substring(colnames(d),5,7),block=c(rep(1,20),rep(2,23),rep(3,21),rep(4,20)))
  
  for (i in 1:length(d$value)){if(d$solar[i]=="Non"){d$solar[i]<-"Non-solarized"}else{d$solar[i]<-"Solarized"}}
  
  #d$solar <- as.factor(d$solar)
  #d$fert <- as.factor(d$fert)
  d$block <- as.factor(d$block)
  
  fit <- lmer(value ~ solar * fert + (1 | block), data = d)
  print(anova(fit))
}

for (i in c(1,2,6,7)){
  print(name[i])
  splitplot_anova(i)
}
## [1] "Crop_Fresh_weight"
## Analysis of Variance Table
##            npar Sum Sq Mean Sq F value
## solar         1  491.0  490.98  2.6047
## fert          5 4175.9  835.18  4.4308
## solar:fert    5  144.8   28.96  0.1537
## [1] "Crop_Dry_weight"
## Analysis of Variance Table
##            npar Sum Sq Mean Sq F value
## solar         1 0.1076 0.10765  0.1447
## fert          5 1.7129 0.34258  0.4606
## solar:fert    5 3.4824 0.69648  0.9364
## [1] "Crop_Brix"
## Analysis of Variance Table
##            npar  Sum Sq Mean Sq F value
## solar         1 0.41962 0.41962  3.7280
## fert          5 0.62676 0.12535  1.1136
## solar:fert    5 1.11298 0.22260  1.9776
## [1] "Crop_NO3"
## Analysis of Variance Table
##            npar   Sum Sq Mean Sq F value
## solar         1  1881517 1881517  1.6826
## fert          5 18214862 3642972  3.2579
## solar:fert    5  6841816 1368363  1.2237

2 Split-plot design は無視

2.1 太陽熱処理のみ

## [1] "Crop_Fresh_weight"

## [1] "Crop_Dry_weight"

## [1] "Crop_Leaf.length"

## [1] "Crop_No.leaves"

## [1] "Crop_Water_content"

## [1] "Crop_Brix"

## [1] "Crop_NO3"

## [1] "Crop_P_Nitrogen"

## [1] "Crop_P_Carbon"

## [1] "Crop_P_Ca"

## [1] "Crop_P_K"

## [1] "Crop_P_Mg"

## [1] "Soil_S1_pH"

## [1] "Soil_S2_pH"

## [1] "Soil_S1_Ex_Ca"

## [1] "Soil_S2_Ex_Ca"

## [1] "Soil_S1_Ex_Mg"

## [1] "Soil_S2_Ex_Mg"

## [1] "Soil_S1_Ex_K"

## [1] "Soil_S2_Ex_K"

## [1] "Soil_S1_Ex_Na"

## [1] "Soil_Compaction_1_20"

## [1] "Soil_Compaction_1500"

## [1] "Soil_S1_Nitrogen"

## [1] "Soil_S2_Nitrogen"

## [1] "Soil_S2_NO3"

## [1] "Soil_S2_SO4"

## [1] "Soil_ROI_S2_096"

## [1] "Soil_ROI_S2_115"

## [1] "Soil_ROI_S2_111"

## [1] "Soil_ROI_S1_075"

## [1] "Soil_ROI_S1_096"

## [1] "Soil_ROI_S1_088"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Burkholderiales;f__Methylophilaceae;g__Methylobacillus"

## [1] "d__Bacteria;p__Proteobacteria;c__Alphaproteobacteria;o__Sphingomonadales;f__Sphingomonadaceae;g__Sphingomonas"

## [1] "d__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Bacillaceae;g__Bacillus"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptomycetales;f__Streptomycetaceae;g__Streptomyces"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Pseudomonadales;f__Pseudomonadaceae;g__Pseudomonas"

## [1] "d__Bacteria;p__Bacteroidota;c__Bacteroidia;o__Flavobacteriales;f__Flavobacteriaceae;g__Flavobacterium"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptosporangiales;f__Streptosporangiaceae;g__Microbispora"

## [1] "pielou_evenness"

## [1] "faith_pd"

## [1] "shannon_entropy"

2.2 肥料のみ

## [1] "Crop_Fresh_weight"

## [1] "Crop_Dry_weight"

## [1] "Crop_Leaf.length"

## [1] "Crop_No.leaves"

## [1] "Crop_Water_content"

## [1] "Crop_Brix"

## [1] "Crop_NO3"

## [1] "Crop_P_Nitrogen"

## [1] "Crop_P_Carbon"

## [1] "Crop_P_Ca"

## [1] "Crop_P_K"

## [1] "Crop_P_Mg"

## [1] "Soil_S1_pH"

## [1] "Soil_S2_pH"

## [1] "Soil_S1_Ex_Ca"

## [1] "Soil_S2_Ex_Ca"

## [1] "Soil_S1_Ex_Mg"

## [1] "Soil_S2_Ex_Mg"

## [1] "Soil_S1_Ex_K"

## [1] "Soil_S2_Ex_K"

## [1] "Soil_S1_Ex_Na"

## [1] "Soil_Compaction_1_20"

## [1] "Soil_Compaction_1500"

## [1] "Soil_S1_Nitrogen"

## [1] "Soil_S2_Nitrogen"

## [1] "Soil_S2_NO3"

## [1] "Soil_S2_SO4"

## [1] "Soil_ROI_S2_096"

## [1] "Soil_ROI_S2_115"

## [1] "Soil_ROI_S2_111"

## [1] "Soil_ROI_S1_075"

## [1] "Soil_ROI_S1_096"

## [1] "Soil_ROI_S1_088"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Burkholderiales;f__Methylophilaceae;g__Methylobacillus"

## [1] "d__Bacteria;p__Proteobacteria;c__Alphaproteobacteria;o__Sphingomonadales;f__Sphingomonadaceae;g__Sphingomonas"

## [1] "d__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Bacillaceae;g__Bacillus"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptomycetales;f__Streptomycetaceae;g__Streptomyces"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Pseudomonadales;f__Pseudomonadaceae;g__Pseudomonas"

## [1] "d__Bacteria;p__Bacteroidota;c__Bacteroidia;o__Flavobacteriales;f__Flavobacteriaceae;g__Flavobacterium"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptosporangiales;f__Streptosporangiaceae;g__Microbispora"

## [1] "pielou_evenness"

## [1] "faith_pd"

## [1] "shannon_entropy"

2.3 メインが肥料の処理の場合

## [1] "Crop_Fresh_weight"

## [1] "Crop_Dry_weight"

## [1] "Crop_Leaf.length"

## [1] "Crop_No.leaves"

## [1] "Crop_Water_content"

## [1] "Crop_Brix"

## [1] "Crop_NO3"

## [1] "Crop_P_Nitrogen"

## [1] "Crop_P_Carbon"

## [1] "Crop_P_Ca"

## [1] "Crop_P_K"

## [1] "Crop_P_Mg"

## [1] "Soil_S1_pH"

## [1] "Soil_S2_pH"

## [1] "Soil_S1_Ex_Ca"

## [1] "Soil_S2_Ex_Ca"

## [1] "Soil_S1_Ex_Mg"

## [1] "Soil_S2_Ex_Mg"

## [1] "Soil_S1_Ex_K"

## [1] "Soil_S2_Ex_K"

## [1] "Soil_S1_Ex_Na"

## [1] "Soil_Compaction_1_20"

## [1] "Soil_Compaction_1500"

## [1] "Soil_S1_Nitrogen"

## [1] "Soil_S2_Nitrogen"

## [1] "Soil_S2_NO3"

## [1] "Soil_S2_SO4"

## [1] "Soil_ROI_S2_096"

## [1] "Soil_ROI_S2_115"

## [1] "Soil_ROI_S2_111"

## [1] "Soil_ROI_S1_075"

## [1] "Soil_ROI_S1_096"

## [1] "Soil_ROI_S1_088"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Burkholderiales;f__Methylophilaceae;g__Methylobacillus"

## [1] "d__Bacteria;p__Proteobacteria;c__Alphaproteobacteria;o__Sphingomonadales;f__Sphingomonadaceae;g__Sphingomonas"

## [1] "d__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Bacillaceae;g__Bacillus"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptomycetales;f__Streptomycetaceae;g__Streptomyces"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Pseudomonadales;f__Pseudomonadaceae;g__Pseudomonas"

## [1] "d__Bacteria;p__Bacteroidota;c__Bacteroidia;o__Flavobacteriales;f__Flavobacteriaceae;g__Flavobacterium"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptosporangiales;f__Streptosporangiaceae;g__Microbispora"

## [1] "pielou_evenness"

## [1] "faith_pd"

## [1] "shannon_entropy"

2.4 メインが太陽熱処理の場合

## [1] "Crop_Fresh_weight"

## [1] "Crop_Dry_weight"

## [1] "Crop_Leaf.length"

## [1] "Crop_No.leaves"

## [1] "Crop_Water_content"

## [1] "Crop_Brix"

## [1] "Crop_NO3"

## [1] "Crop_P_Nitrogen"

## [1] "Crop_P_Carbon"

## [1] "Crop_P_Ca"

## [1] "Crop_P_K"

## [1] "Crop_P_Mg"

## [1] "Soil_S1_pH"

## [1] "Soil_S2_pH"

## [1] "Soil_S1_Ex_Ca"

## [1] "Soil_S2_Ex_Ca"

## [1] "Soil_S1_Ex_Mg"

## [1] "Soil_S2_Ex_Mg"

## [1] "Soil_S1_Ex_K"

## [1] "Soil_S2_Ex_K"

## [1] "Soil_S1_Ex_Na"

## [1] "Soil_Compaction_1_20"

## [1] "Soil_Compaction_1500"

## [1] "Soil_S1_Nitrogen"

## [1] "Soil_S2_Nitrogen"

## [1] "Soil_S2_NO3"

## [1] "Soil_S2_SO4"

## [1] "Soil_ROI_S2_096"

## [1] "Soil_ROI_S2_115"

## [1] "Soil_ROI_S2_111"

## [1] "Soil_ROI_S1_075"

## [1] "Soil_ROI_S1_096"

## [1] "Soil_ROI_S1_088"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Burkholderiales;f__Methylophilaceae;g__Methylobacillus"

## [1] "d__Bacteria;p__Proteobacteria;c__Alphaproteobacteria;o__Sphingomonadales;f__Sphingomonadaceae;g__Sphingomonas"

## [1] "d__Bacteria;p__Firmicutes;c__Bacilli;o__Bacillales;f__Bacillaceae;g__Bacillus"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptomycetales;f__Streptomycetaceae;g__Streptomyces"

## [1] "d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Pseudomonadales;f__Pseudomonadaceae;g__Pseudomonas"

## [1] "d__Bacteria;p__Bacteroidota;c__Bacteroidia;o__Flavobacteriales;f__Flavobacteriaceae;g__Flavobacterium"

## [1] "d__Bacteria;p__Actinobacteriota;c__Actinobacteria;o__Streptosporangiales;f__Streptosporangiaceae;g__Microbispora"

## [1] "pielou_evenness"

## [1] "faith_pd"

## [1] "shannon_entropy"

2.5 Soil Compaction

2.6 Microbiome

2.7 Correlation

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = -10.336, df = 82, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.8323372 -0.6411647
## sample estimates:
##        cor 
## -0.7521653

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = -8.1263, df = 82, p-value = 3.927e-12
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.7717768 -0.5292908
## sample estimates:
##       cor 
## -0.667895

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = -2.3683, df = 82, p-value = 0.02022
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.44336860 -0.04084557
## sample estimates:
##       cor 
## -0.253025

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = -4.7196, df = 82, p-value = 9.609e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.6155799 -0.2750408
## sample estimates:
##        cor 
## -0.4621823

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = -16.114, df = 82, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.9151306 -0.8084943
## sample estimates:
##        cor 
## -0.8717779

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = 12.188, df = 82, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.7106005 0.8677612
## sample estimates:
##       cor 
## 0.8027042

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = 5.4372, df = 82, p-value = 5.454e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3376444 0.6566942
## sample estimates:
##       cor 
## 0.5147753

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = 4.1345, df = 82, p-value = 8.543e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.220587 0.578244
## sample estimates:
##       cor 
## 0.4153396

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = -4.1914, df = 82, p-value = 6.957e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.5820277 -0.2260058
## sample estimates:
##        cor 
## -0.4200478

## 
##  Pearson's product-moment correlation
## 
## data:  x$value1 and x$value2
## t = -2.3815, df = 82, p-value = 0.01956
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.44450453 -0.04225787
## sample estimates:
##        cor 
## -0.2543487

2.8 DEG

2.9 DEG